package ch.zbw.timeline.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import lombok.Data;

/**
 * Domain class for age bonus years
 */
@Entity
@SequenceGenerator(name = "id_bonus_age", initialValue = 1, allocationSize = 1)
@Table(name = "bonus_age")
@Data
public class BonusAge implements Serializable {

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id_bonus_age", nullable = false)
	private int id;

	@Column(name = "age", nullable = true)
	private Integer age;

	@Column(name = "number_of_weeks", nullable = true)
	private Integer numberOfWeeks;

	public BonusAge() {
	}

	public BonusAge(Integer age, Integer numberOfWeeks) {
		super();
		this.age = age;
		this.numberOfWeeks = numberOfWeeks;
	}
}
